#ifndef CGAME_H
#define CGAME_H

class CSavedGame;


//*************************************************************************************************
//
//  This class serves to define the interface that the CPokerConnection class uses to talk to all
//  classes that implement game specific logic (e.g., CHoldemGame and CStudGame).
//
//  kharmon.  09-28-05.
//
//*************************************************************************************************
class CGame
{
public:
    CGame();

    virtual ~CGame() {};

    // called to tell the game to deal the cards.
	virtual bool8 deal(int32 balance)  = 0;

    // called to tell the game that the user has raised.
	virtual bool8 raise(int32 balance, uint8 *pucMsgBuf) = 0;   // kharmon.  09-20-07.  #16842.

    // called to tell the game that the user has folded.
	virtual bool8 fold(int32 balance)  = 0;

    // this should return the amount of the user's initial bet.
	virtual int32 getBet() = 0;

    // this is called when a game has been restored and the server 
    // wants the game to send the "restored" state to the client.
	virtual void send() = 0;

    // Theoretically should load the game state into the CSavedGame object...
    // in practice, not used right now.
	virtual void save(CSavedGame*) = 0;

    // if the game is loaded and valid, should return true, otherwise false.
    virtual bool8 isGameOK() = 0;

    // kharmon.  01-05-06.  #4250.  Used when a player hits a big progressive jackpot.
    virtual bool8 hasMalfunction() { return m_bMalfunction; }

    // kharmon.  01-05-06.  #4250.  Used when a player hits a big progressive jackpot.
    virtual void  setMalfunction(bool8 bMalfunction) { m_bMalfunction = bMalfunction; }

private:

    bool8 m_bMalfunction;   // kharmon.  01-05-06.  #4250.  Used when a player hits a big progressive jackpot.

};


#endif